<template>
  <div class="wholesale-add">
    <!-- 供应商及合同选择 -->
    <article>
      <supplier-and-contract-component
        :supplier-id.sync="form_data.supplier"
        :contract-id.sync="form_data.contract"
        :bus-model="bus_model"
        @change="onSupplierAndContractChange"
      ></supplier-and-contract-component>
    </article>
    <article>
      <purchase-products-list-component :products.sync="form_data.products"></purchase-products-list-component>
    </article>
    <article>
      <carryway-and-address-component
        @change-address="onAddressChanged"
        :carryway-id.sync="form_data.carryway"
        :address-id.sync="form_data.address"
        :is-edit="is_edit"
      ></carryway-and-address-component>
      <!-- <div class="block">
        <article class="orderTab">
          <div v-for="(item, index) in order_tab" :key="index" class="detail">
            <p
              :class="{ active: activeIndex === index }"
              @click="changeIndex(index)"
            >{{ item.title }}</p>
            <div v-if="activeIndex === 0">
              <el-form-renderer
                label-width="100px"
                v-model="form_data.extend"
                :content="extend_model"
                inline
              ></el-form-renderer>
            </div>
            <div v-if="activeIndex === 1">
              <indexInfo-products-list-component :products.sync="form_data.products" />
            </div>
          </div>
        </article>
      </div>-->
      <div class="block otherInfo">
        <section class="orderTab">
          <div class="detail">
            <p :class="{ active: activeIndex === 0 }" @click="changeIndex(0)">附加信息</p>
          </div>
          <div class="detail">
            <p :class="{ active: activeIndex === 1 }" @click="changeIndex(1)">序列号信息</p>
            <div v-show="activeIndex === 1">
              <el-editable :columns="order_tab[1].columns" :data="order_tab[1].tabData"></el-editable>
            </div>
          </div>
        </section>
      </div>
    </article>
  </div>
</template>

<script src="./index.js"></script>
<style lang="less" src="./index.less" scoped></style>
